<?php
/*
Plugin ID: cn.usephp.shop
Plugin Name: 网上商城
Plugin URI: http://www.usephp.cn/plugins/shop.html
Description: 网上商城，完成网上卖东西的。
Author: Leo Ning
Version: 1.0
Author URI: http://www.usephp.cn/
*/
// 桌面图标
function __the_shop_app_icon($apps) {
	// 我的网站
	$apps [800] = array ('id' => "shop", 'url' => BASE_URL . 'plugins/shop/', 'cls' => 'icon_shop', 'name' => '我的网店', 'tip' => '我的网店', 'icon' => the_plugin_url ( 'shop/images/shop.png' ) );
	
	return $apps;
}
bind ( 'get_desktop_applications', '__the_shop_app_icon' );
// shop的桌面样式
function __the_shop_app_style($style) {
	echo ".icon_shop {background: url(" . the_plugin_url ( 'shop/images/shop2.png' ) . ") no-repeat 0 50%;}\n";
	return $style;
}
bind ( 'desktop_styles', '__the_shop_app_style' );
//注册分类类型：产品分类
function __the_shop_product_category_type($types) {
	$types ['product'] = "产品分类";
	return $types;
}
bind ( 'get_category_types', '__the_shop_product_category_type' );

function __the_shop_desktop_widget($widget){
	echo '<div class="stuffbox">
		  		<div class="handlediv" title="点击以切换"><br/></div>
				<h3>我的网店</h3>				
				<div class="inside">
					<p>新订单</p>
					<p>新会员</p>
					<p>今日收款，昨日收款，本周收款</p>
				</div>
		</div>';
	return $widget;
}
bind('get_desktop_widgets','__the_shop_desktop_widget');